<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
    <META http-equiv=Content-Type content="text/html; charset=gb2312">
    <link rel="stylesheet" href="/sys/resources/css/reset.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/sys/resources/css/style.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/sys/resources/css/invalid.css" type="text/css" media="screen" />
    <script type="text/javascript" src="/sys/resources/scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="/sys/resources/scripts/simpla.jquery.configuration.js"></script>
    <script type="text/javascript" src="/sys/resources/scripts/facebox.js"></script>
    <title>编辑用户信息</title>
</HEAD>

<BODY class="mian_bg">
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
    <TR height=28>
        <TD class="addr_td">&nbsp;&nbsp;<img src="../../sys/resources/images/addr_icon.png">&nbsp;当前位置: 编辑信息 > 修改密码</TD>
    </TR>
    <TR>
        <TD bgColor=#7ca600 height=1></TD>
    </TR>
    <TR>
        <TD bgColor=#8ebe00 height=1></TD>
    </TR>
</TABLE>
<div id="main-content">
    <div class="content-box">
        <!-- Start Content Box -->
        <div class="content-box-header">
            <h3>修改密码</h3>
            <div class="clear"></div>
        </div>
        <div class="tab-content">
            <form action="/sys/sysUser/changePwd.do" method='post' id="form" name="form" >
                <fieldset>
                    <p>
                        <label>账号</label>
                        <input type="hidden" name="uid" id="uid"  value="${user.uid}"/>
                        <input type="hidden" name="passport"  value="${user.passport}"/>
                        <input class="text-input small-input" disabled="disabled" type="text" name="passport" id="passport" value="${user.passport}"/>
                    </p>

                    <p>
                        <label>旧密码</label>
                        <input type="password" class="text-input small-input" name="nowPwd" id="nowPwd" value=""/>
                    </p>

                    <p>
                    <label>新密码</label>
                        <input type="password" class="text-input small-input" name="newPwd" id="newPwd" value=""/>
                    </p>

                    <p>
                    <label>确认密码</label>
                    <input type="password" class="text-input small-input" id="repwd" name="repwd" value="" />
                    </p>
                    <p>
                        <input class="button" type="button" onclick="check();" value=" 提交 "/>&nbsp;&nbsp;<input class="button" type="reset" value=" 重填 " />
                    </p>
                </fieldset>
                <div class="clear"></div>
                <!-- End .clear -->
            </form>
        </div>
    </div>
</div>
</div>

<script type="text/javascript">
    function check() {

        if ($("#nowPwd").val() == "") {
            alert("请完善旧密码");
            return false;
        }

        if ($("#newPwd").val() == "") {
            alert("请完善新密码");
            return false;
        }
        if ($("#repwd").val() != $("#newPwd").val()) {
            alert("密码不一致");
            return false;
        }
        form.submit();

    }

    <c:if test="${not empty msg}">alert('${msg}');</c:if>
</script>

</BODY>
</HTML>